package com.whitedust.top90;

import java.util.Arrays;

/**
 *
 * @author A
 * @since 2025/11/16 21:04
 */

public class Top86 {
    public int uniquePaths(int m, int n) {
        int[] dp = new int[n + 1];
        Arrays.fill(dp, 0);
        dp[1]=1;
        for (int i = 0; i < m; i++) {
            for (int j = 0; j < n; j++) {
                dp[j + 1] = dp[j]+dp[j+1];
            }
        }
        return dp[n];
    }
}
